package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: PREETHI
 * Date: 22/5/13
 * Time: 2:18 PM
 * To change this template use File | Settings | File Templates.
 */
public class movie {
    private String movieName;
    private int year;
    private String director;
    private String rating;
    private int quantity;

   public movie(String name,int year, String director,String rating,int quantity)
   {
       this.movieName=name;
       this.year=year;
       this.director=director;
       this.rating=rating;
       this.quantity=quantity;
   }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        movie movie = (movie) o;

        if (year != movie.getYear()) return false;
        if (!movieName.equals(movie.getMovieName())) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = movieName.hashCode();
        result = 31 * result + year;
        return result;
    }

    public String getMovieName() {
        return movieName;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getRating() {
        return rating;
    }

    public void setRating(String rating) {
        this.rating = rating;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
}
